home *** CD-ROM | disk | FTP | other *** search
- { This program will take a *.H file created using the Megamax resource
- construction program and convert it to an *.I format for use with
- OSS Personal Pascal. I have used it with great success in developing
- packages now. I hope you will enjoy using it. It is free as long as
- you do not remove any acknowledgements in the code..... }
-
- program change;
- CONST
- {$I GEMCONST}
- TYPE
- {$I GEMTYPE}
- var
- def_path,full_name :Path_Name;
- dumm :char;
- tmpstr1,
- tmpstr2,
- file1,
- file2,
- alert :string[255];
- nwpc :string[4];
- f1,f2 :TEXT;
- i :integer;
- {$I GEMSUBS}
- {$I terminal.pas}
-
- BEGIN
- alert := '[0][| *.H to *.I|Conversion Utility|Written By David Bryan|][ OK ]';
- if Init_Gem >= 0 then
- i := Do_Alert(alert,0);
- BEGIN
- def_path := 'A:\*.H';
- nwpc := ' = ';
- color(3,2);
- cls;
- if Get_In_file(def_path,full_name) then
- BEGIN
- cls;
- file1 := full_name;
- i := Pos('.',file1);
- file2 := Copy(file1,1,i) ;
- file2 := Concat(file2,'I');
- writeln('converting ',file1,' to ',file2);
- reset(f1,file1);
- rewrite(f2,file2);
- while not Eof(f1) do
- begin
- readln(f1,tmpstr1);
- tmpstr2 := copy(tmpstr1,9,(Length (tmpstr1) - 8));
- i := Pos (' ',tmpstr2);
- Insert (nwpc,tmpstr2,i);
- writeln(f2,tmpstr2,' ;');
- end;
- close(f1);
- close(f2);
- cls;
- alert := Concat('[1][',file1,'| |converted to| |',file2,'][OK]');
- i := Do_Alert(alert,0);
- END;
- END;
- Exit_Gem;
- END.
-